<template>
    <div class="ivu-p">
        <DescriptionList :col="4">
            <Description term="患者编号：">{{
                data.patient_card_id
            }}</Description>
            <Description term="遗传史：">{{
                data.is_genetic_history_str
            }}</Description>
            <Description term="职业：">{{ data.profession }}</Description>
            <Description term="婚姻状态：">{{
                data.marital_status_str
            }}</Description>
            <Description term="是否怀孕：">{{
                data.is_pregnancy_str
            }}</Description>
            <Description term="渠道：">{{ data.channel_id_str }}</Description>
            <Description term="未到天数：">{{
                data.belong_assign_time_day
            }}</Description>
            <Description term="分配次数：">{{ data.assign_num }}</Description>
            <!-- <Description term="介绍人：">{{data.}}</Description> -->
            <Description term="来源备注：">{{
                data.source_remark
            }}</Description>
            <Description term="细分渠道：">{{
                data.subdivided_channels_id_str
            }}</Description>
            <Description term="QQ：">{{ data.qq }}</Description>
            <Description term="接触时间：">{{
                data.speak_time_str
            }}</Description>
            <!-- <Description term="唯一身份：">
                <Tooltip placement="top">
                    <span :style="style">{{data.visitor_uid}}</span>
                    <span slot="content">{{data.visitor_uid}}</span>
                </Tooltip>
            </Description> -->
            <Description term="IP：">{{ data.source_ip }}</Description>
            <Description term="来源网址："
                ><Ellipsis
                    v-if="data.source_url"
                    :text="data.source_url"
                    :length="15"
                    tooltip
            /></Description>
            <!-- <Description term="来源网址：">
                <Tooltip placement="top">
                    <span :style="style">{{data.source_url}}</span>
                    <span slot="content">{{data.source_url}}</span>
                </Tooltip>
            </Description> -->
            <Description term="访问网址："
                ><a target="_blank" :href="data.visitor_url"
                    ><Ellipsis
                        v-if="data.visitor_url"
                        :text="data.visitor_url"
                        :length="15"
                        tooltip /></a
            ></Description>
            <!-- <Description term="访问网址：">
                <a target="_blank" :href="data.visitor_url">
                    <Tooltip placement="top">
                        <span :style="style">{{data.visitor_url}}</span>
                        <span slot="content">{{data.visitor_url}}</span>
                    </Tooltip>
                </a>
            </Description> -->
            <Description term="搜索词："
                ><Ellipsis
                    v-if="data.search_key"
                    :text="data.search_key"
                    :length="8"
                    tooltip
                    :transfer="true"
            /></Description>
            <!-- <Description term="搜索词：">
                <Tooltip placement="top">
                    <span style="display:inline-block;width:150px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{data.search_key}}</span>
                    <span slot="content">{{data.search_key}}</span>
                </Tooltip>
            </Description> -->
            <Description term="关键词：">{{ data.keyword }}</Description>
            <Description term="对话方式：">{{
                data.dialog_mode_id_str
            }}</Description>
            <Description term="接听电话：">{{ data.tel }}</Description>
            <Description term="报备人：">{{ data.reported_name }}</Description>
            <Description term="抖音号：">{{data.dy_num}}</Description>
            <Description term="对话状态：">{{data.dialog_status_str}}</Description>
            <Description term="词性：">{{data.word_class}}</Description>
            <Description term="诊断类型：">{{data.diagnosis_type}}</Description>
        </DescriptionList>
        <DescriptionList :col="2">
            <!-- <Description term="唯一身份："><Ellipsis v-if="data.visitor_uid" :text="data.visitor_uid" :length="12" tooltip /></Description> -->
            <Description term="唯一身份：">{{ data.visitor_uid }}</Description>
            <Description term="市场渠道：">{{data.market_one_id_str}}{{data.market_two_id_str?'-':''}}{{data.market_two_id_str}}{{data.market_three_id_str?'-':''}}{{data.market_three_id_str}}</Description>
            <Description term="留言内容："><div v-html="data.leave_msg"></div></Description>
            <Description term="到诊人：">{{ data.revisiting_name }}</Description>
        </DescriptionList>
    </div>
</template>
<script>
    import { patientindexmarketinginfo } from '@/api/hqapi';
    export default {
        name: 'origins',
        data () {
            return {
                params: { patient_user_id: '' },
                data: {},
                style: {
                    display: 'inline-block',
                    width: '150px',
                    overflow: 'hidden',
                    whiteSpace: 'nowrap',
                    textOverflow: 'ellipsis'
                }
            };
        },
        methods: {
            askData (id) {
                this.data = {};
                this.params.patient_user_id = id;
                this.askDatas();
            },
            askDatas () {
                patientindexmarketinginfo(this.params).then((res) => {
                    this.data = res;
                });
            }
        }
    };
</script>
<style scoped>
.ivu-p {
    /* height: calc( 100vh - 390px); */
    overflow: auto;
}
</style>
